#ifndef SERVLISTWIDGET_H
#define SERVLISTWIDGET_H

#include <QListWidget>
#include <QPushButton>
#include <QLabel>
#include <QLineEdit>
#include <QLayout>

#include "MassagesTypes.h"

class ServListWidget : public QWidget
{
    Q_OBJECT

public:

    QListWidget* list;

    QLineEdit* lineEdit;
    QLineEdit* ipEdit;

    QPushButton* hostGame_b;
    QPushButton* refreshList_b;
    QPushButton* connect_b;
    QPushButton* connetByIp_b;

    std::vector<Host> servList;


    explicit ServListWidget(QWidget *parent = 0);

signals:
    void connectTry(sf::IpAddress);

public slots:
    void redrawList(std::vector<Host>* list);
    void tryToConnect();

};

#endif // SERVLISTWIDGET_H
